package com.centriole.service.workflow.entity.shiro;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

/**
 * 角色实体类
 * @author Administrator
 */
@SuppressWarnings("serial")
public class Role implements Serializable{
    private String roleId;

    private String roleName;
    // 角色和权限 多对多关系
    private List<Permission> permissions = new ArrayList<Permission>();
    
    public List<Permission> getPermissions() {
		return permissions;
	}
    

	public void setPermissions(List<Permission> permissions) {
		this.permissions = permissions;
	}

	public String getRoleId() {
        return roleId;
    }

    public void setRoleId(String roleId) {
        this.roleId = roleId;
    }

    public String getRoleName() {
        return roleName;
    }

    public void setRoleName(String roleName) {
        this.roleName = roleName == null ? null : roleName.trim();
    }

	@Override
	public String toString() {
		return "Role [roleId=" + roleId + ", roleName=" + roleName + ", permissions=" + permissions + "]";
	}

	public Role(String roleId, String roleName, List<Permission> permissions) {
		this.roleId = roleId;
		this.roleName = roleName;
		this.permissions = permissions;
	}

	public Role() {
	}
}